<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../static/main/css/styles.css">
<link rel="stylesheet"
	href="../webjars/bootstrap/3.3.7-1/css/bootstrap.css">
<script type="text/javascript" src="../static/validate/js/jquery.js"></script>
<script type="text/javascript"
	src="../static/validate/js/jquery.validate.js"></script>
<script type="text/javascript"
	src="../static/validate/js/messages_zh.js"></script>
<script type="text/javascript"
	src="../webjars/bootstrap/3.3.7-1/js/bootstrap.js"></script>
<script type="text/javascript">
	$().ready(function() {
		$("#myform").validate({
			rules : {
				pwd : {
					required : true,
					minlength : 8
				},
				password : {
					required : true,
					equalTo : '#a',
					minlength : 8
				}
			},
			messages : {
				pwd : {
					required : '请输入你要修改的新密码',
					minlength : '新密码不能小于8位'
				},
				password : {
					equalTo : '请您确认你输入的新密码',
					minlength : '新密码不能小于8位',
					required : '请再次输入你要修改后的新密码'
				}
			}
		});
	});
</script>
<style type="text/css">
#xgmm {
	width: 300px;
	margin-top: 300px;
	margin-left: 440px;
	border: 1px solid black;
}

#xgmm a {
	text-decoration: none;
}

.error {
	color: red;
}

#fa {
	margin: 0;
	padding: 0 5px;
	font-weight: 1000;
	font-size: 25px;
}
</style>
</head>
<body>
	<div class="caidan">
		<div class="htmleaf-container">
			<nav class="animenu">
				<ul class="animenu__nav"
					style="margin-left: 15%; margin-right: 15%;">
					<li style="font-size: 20px; font-weight: 1100;"><a id="fa">发票管理系统</a></li>
					<li><a href="../main"><span
							class="glyphicon glyphicon-home">首页</span></a></li>
					<li><a>欢迎您:<span sec:authorize="hasRole('ROLE_DBA')">开发者</span><span
							sec:authorize="!hasRole('ROLE_DBA')"
							sec:authentication="principal.name">张三</span></a></li>
					<li sec:authorize="hasRole('ROLE_MANAGER')"><a
						href="../UserTenant/zuhugl"><span
							class="glyphicon glyphicon-pencil">租户编辑</span></a></li>
					<li sec:authorize="hasRole('ROLE_ADMIN')"><a
						href="../UserManager/xzgl"><span
							class="glyphicon glyphicon-pencil">用户编辑</span></a></li>
					<li sec:authorize="hasRole('ROLE_ZUHU')"><a
						href="../User/xzgl"><span class="glyphicon glyphicon-pencil">用户管理</span></a></li>
					<li sec:authorize="hasRole('ROLE_MANAGER')"><a
						href="../UserManager/fpcx">电子发票查询</a></li>
					<li sec:authorize="hasRole('ROLE_MANAGER')"><a
						href="../UserManager/sqxx">软件授权信息</a>
					<li sec:authorize="hasRole('ROLE_ZUHU')"><a
						href="../Tenantxx/zxfp">新增电子发票信息</a></li>
					<li sec:authorize="hasRole('ROLE_ADMIN')"><a
						href="../SysUser/yhcz">用户操作日志</a></li>
					<li sec:authorize="hasRole('ROLE_ZUHU')"><a
						href="../UserTenant/xgmm"><span
							class="glyphicon glyphicon-tags">&nbsp;修改密码</span></a></li>
					<li sec:authorize="hasRole('ROLE_MANAGER')"><a
						href="../UserManager/xgmm"><span
							class="glyphicon glyphicon-tags">&nbsp;修改密码</span></a></li>
					<li sec:authorize="hasRole('ROLE_ADMIN')"><a
						href="../SysUser/xgmm"><span class="glyphicon glyphicon-tags">&nbsp;修改密码</span></a></li>
					<li style="float: right;"><a href="../logout"><span
							class="glyphicon glyphicon-off">注销</span></a></li>
				</ul>
			</nav>
		</div>
	</div>

	<div id="xgmm">
		<form action="save" method="post" id="myform">
			<p>
				<label>原密码:</label><input type="password" onchange="ymm(this.value)"
					id="ymm" placeholder="请输入原密码" />
			</p>
			<div>
				<label id="parem" for="ymm"></label>
			</div>
			<p>
				<label>新密码:</label><input id="a" type="password" name="pwd"
					placeholder="请输入新密码">
			</p>
			<p>
				<label>新密码:</label><input type="password" name="password"
					placeholder="请再次输入新密码">
			</p>
			<p style="text-align: right;">
				<button style="margin-right: 20px;" type="submit">确定</button>
				<button style="margin-right: 20px;" type="reset">取消</button>
			</p>
		</form>
	</div>
	<script type="text/javascript">
		function ymm(ymm) {
			$.post("oldmm", {
				ymm:"ymm"
			}, function(data) {
				if (!date) {
					$("#parem").html("您输入的原密码错误");
				} else {
					$("#parem").html("");
				}
			})
		}
	</script>
</body>
</html>